package com.mazong.serverblog.mapper;

import com.mazong.serverblog.pojo.TbUser;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component(value = "iDbUserMapper")
public interface IDbUserMapper {

    TbUser getUserById(@Param("id") Integer id);
    int addUser(TbUser user);
    void delUser(@Param("userId") Integer userId);
    void updateUser(TbUser user);
    void updateUserName(@Param("id") Integer id, @Param("name") String name);

    List<TbUser> getUserByPage(@Param("pageSize") Integer pageSize, @Param("pageNo") Integer pageNo);
}
